Skip to content

Pin the launch runtime in TUI docker-gate tests - #57

Merged
mkonopelski-gd merged 1 commit into
mainfrom
fix/tui-startup-gate-tests
Jul 30, 2026
Merged

Pin the launch runtime in TUI docker-gate tests#57
mkonopelski-gd merged 1 commit into
mainfrom
fix/tui-startup-gate-tests

Conversation

@mkonopelski-gd

Copy link
Copy Markdown
Contributor

Three TestStartupGate tests fail on main for anyone whose local backend runtime is process.

Root cause. The startup gate branches on the backend runtime — docker → StartContainersScreen, process → StartBackendProcessScreen — but the container-path tests never pinned it, so resolve_backend_runtime() read the developer's own BACKEND_RUNTIME / saved choice. Since the sandbox-without-docker work made process a real option, those tests started asserting the wrong branch. They were never docker-specific by construction, only by the environment they happened to run in.

Fix. A _docker_runtime() helper alongside the existing _gate_ready(), which both resolves the runtime to docker and marks it explicitly configured — the latter matters because otherwise the gate falls into its infer-from-what's-running block and probes the real host for a backend process. Applied to all five container-path tests, not just the three that were red: test_start_no_quits_app (quits whatever screen is up) and test_backend_not_ready_retry_skips_compose_up (start_containers is trivially never awaited on the process path) were passing for the wrong reason.

No production code touched.

Verification. make unit-tests green. The gate tests pass with BACKEND_RUNTIME unset, =process and =docker, which is the property that was missing.

The startup gate branches on the backend runtime (docker -> StartContainersScreen,
process -> StartBackendProcessScreen), but the container-path tests never pinned it,
so they read the developer's own BACKEND_RUNTIME or saved choice. On a machine
configured for process — possible since the sandbox-without-docker work — three of
them asserted the wrong branch and failed.

Adds a _docker_runtime() helper next to the existing _gate_ready(), marking the
runtime explicitly configured (so the infer-from-what's-running block, which probes
the real host for a backend process, is skipped) and resolving it to docker. Applied
to all five container-path tests, including the two that only passed by accident.

Verified green with BACKEND_RUNTIME unset, =process and =docker.
@mkonopelski-gd
mkonopelski-gd merged commit 00fc066 into main Jul 30, 2026
3 checks passed
@mkonopelski-gd
mkonopelski-gd deleted the fix/tui-startup-gate-tests branch July 30, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants